package com.example.addressbook;

import android.widget.*;
import android.view.View;
import android.view.ViewGroup;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle; 
import android.content.Intent; 
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentStatePagerAdapter;
import android.view.LayoutInflater;
import android.support.design.widget.FloatingActionButton;
import android.support.v4.view.PagerAdapter;

import java.util.*;

public class FragmentAdapter extends FragmentStatePagerAdapter{
	
	private List<Fragment> fragments;
	
	private List<String> titles;
	
	public FragmentAdapter(FragmentManager fm,List<Fragment> fs,List<String> ts){
		super(fm);
		fragments = fs;
		titles = ts;
	}
	
	@Override
	public Fragment getItem(int position){
		return fragments.get(position);
	}
	
	@Override
	public CharSequence getPageTitle(int position){
		return titles.get(position);
	}
	
	@Override
	public int getCount(){
		return 3;
	}
	
	@Override
	public int getItemPosition(Object object){
		return PagerAdapter.POSITION_NONE;
	}
}